#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.common.bean.vo;

import ${package}.common.bean.po.DataTree;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * Description: ViewTree
 *
 * @author wupanhua
 * @date 2019/8/6 15:28
 *
 * <pre>
 *              ${copyright}
 *      Copyright (c) 2019. All Rights Reserved.
 * </pre>
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ViewTree implements DataTree<ViewTree> {

    /**
     * 主键
     */
    @ApiModelProperty("主键")
    private Long id;
    /**
     * 标题
     */
    @ApiModelProperty("标题")
    private String title;
    /**
     *是否展开
     */
    @ApiModelProperty("是否展开")
    private Boolean expand;
    /**
     *链接
     */
    @ApiModelProperty("链接")
    private String url;
    /**
     *父级菜单
     */
    @ApiModelProperty("父级菜单")
    private Long parentid;
    /**
     *子菜单
     */
    @ApiModelProperty("子菜单")
    private List<ViewTree> children;

    /**
     * Description:
     * <获得父级id>
     *
     * @return java.lang.Long
     * @author YL
     * @date 16:06 2019/8/8
     **/
    @Override
    @JSONField(serialize = false)
    public Long getParentId() {
        return parentid;
    }

    /**
     * Description:
     * <获得子列表>
     *
     * @param childList 1
     * @author YL
     * @date 16:08 2019/8/8
     **/
    @Override
    public void setChildList(List<ViewTree> childList) {
        this.children = childList;
    }

    @Override
    @JSONField(serialize = false)
    public List<ViewTree> getChildList() {
        return this.children;
    }
}
